# 数据类型是不允许改变的,这就意味着如果改变数字数据类型的值,将重新分配内存空间

var1 = 10
var2 = 20
var3 = 30
print("var1=", var1)
print("var2=", var2)
print("var3=", var3)

var1 = 15
print("var1=", var1)

del var1

# print(var1) # name 'var1' is not defined 类似于java空指针?

float = float(var2)
print("float", float)
int = int(var2)
print("int",int)
complex1 = complex(int)
print("complex1", complex1)
complex2 = complex(1, 2)
print("complex2", complex2)
print("complex2,real实部", complex2.real)
print("complex2,imag虚部", complex2.imag)

